#!/bin/bash
cd /root
#wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz --no-check-certificate
wget https://mirrors.huaweicloud.com/python/3.10.14/Python-3.10.14.tgz --no-check-certificate
tar -xvf Python-3.10.14.tgz
cd Python-3.10.14
./configure --prefix=/usr/local/python3.10.14 --enable-loadable-sqlite-extensions --enable-shared --with-openssl=/usr/local/openssl11/
make -j120
make install

cat <<EOF >/usr/local/set_Python-3.10.14_env.sh
export PATH=/usr/local/python3.10.14/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/python3.10.14/lib:$LD_LIBRARY_PATH
EOF

source /usr/local/set_Python-3.10.14_env.sh
pip3 install --upgrade pip
python3 --version
pip3 show pip
